import com.gargoylesoftware.htmlunit.BrowserVersion;
import com.gargoylesoftware.htmlunit.Page;
import com.gargoylesoftware.htmlunit.WebClient;
import com.gargoylesoftware.htmlunit.html.HtmlPage;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.openqa.selenium.WebDriver;

import java.io.IOException;
import java.text.ParseException;
import java.text.SimpleDateFormat;

/**
 * Created by zhongwei on 2016/12/28.
 */
public class Test {

    public static void main(String[] args) throws ParseException, IOException {
        WebClient webClient = new WebClient(BrowserVersion.CHROME);
        webClient.getOptions().setCssEnabled(true);
        webClient.getOptions().setJavaScriptEnabled(true);
        webClient.getOptions().setUseInsecureSSL(true);
        HtmlPage page = webClient.getPage("http://xs1.hntvchina.com/search?q=VERITAS%20DGC&safe=strict&tbs=cdr%3A1%2Ccd_min%3A7%2F15%2F2012%2Ccd_max%3A7%2F21%2F2012&tbm=nws&gws_rd=cr");
        String str = page.getWebResponse().getContentAsString();
        System.out.println(str);
    }
}
